<template>
  <div>
    <h1>子组件向父组件传值</h1>
    <h2>Count:{{ count }}</h2>
    <hr />
    <ChildEmit @updateCount="updateCount" @click="hander1"></ChildEmit>
  </div>
</template>
<script setup>
import { ref } from "vue";
import ChildEmit from "./ChildEmit.vue";

const count = ref(0);
const updateCount = (n) => {
  console.log('updateCount',n);
  count.value += n;
};
const hander1 = () => {
    console.log('hander1')
  alert(123);
};
</script>
